package com.study.hisapi.utils;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

@Data
public class Context {
    private final Map<String, Object> attributes = new HashMap<>();

    private String service;
    private String hospital;
    private String hisUrl;
    private String method;

    public Object getAttribute(String attributeName) {
        return attributes.get(attributeName);
    }

    public void setAttribute(String attributeName, Object attributeValue) {
        attributes.put(attributeName, attributeValue);
    }

    public void removeAttribute(String attributeName) {
        attributes.remove(attributeName);
    }
}